/*
 * pulse.h
 *
 *  Created on: Nov 28, 2023
 *      Author: FFTAI
 */


#ifndef USER_PULSE_H_
#define USER_PULSE_H_


#include "ch32v20x.h"
#ifdef  C_GLOBALS
#define EXTERN
#else
#define EXTERN   extern
#endif

typedef  struct{
   uint8_t  Current;
   uint16_t width;
}Pulse_Struct;

EXTERN  Pulse_Struct pulse;

EXTERN  uint8_t mode;


void Pulse_P(void);
void Pulse_N(void);
void Pluse_Close( void );
void Pluse_Timer_INIT(u16 arr , u16 psc  );
void Pluse_Width_Set( u16  width);
void Pluse_Init(void);
void Pluse_Predischarge( void );
#endif /* USER_PULSE_H_ */
